 /* 
 * File:   cBullet.h
 * Author: josep
 *
 * Created on 30 / desembre / 2010, 03:36
 */

#ifndef CBULLET_H
#define	CBULLET_H

#include <cmath>
#include "cLateralAgent.h"
#include "cAutonomousAgent.h"


class cBullet:public cAutonomousAgent {
public:
    enum Estado {OFF=0, FIRED=1, EXPLOITING=2, DEATH=3};
    enum Transition {FIRE=0, EXPLODE, DIE};
    cBullet();
    cBullet(const cBullet& orig);
    virtual ~cBullet();
    virtual void Init(cTexture *texture, int PosX, int PosY, 
                                float force, float angle, int Width=0,
                                int Height=0);
    virtual void Init(cTexture *texture, int PosX, int PosY,
                                float force, int angle, int Width=0,
                                int Height=0);
    virtual bool isDead();
    virtual void on();
    virtual void SetInTheAir(bool inTheAir);
    virtual void NextStep(int time);

protected:
    virtual int ChangeFramestate(int, int, int);
private:
    void Init();
    float force;
    float angle;
};

#endif	/* CBULLET_H */

